package util

import (
	"encoding/json"
	"fmt"
	"unsafe"
)

func ToString(o interface{}) string {
	bts, err := json.Marshal(o)
	if err != nil {
		return fmt.Sprint(o)
	}
	return *(*string)(unsafe.Pointer(&bts))
}
